1. Field of the Invention
The present invention relates a method and apparatus for rendering, and more particularly, to a depth test which is a rasterization job for rendering a first model desired to be rendered so that a hidden surface which is a part of the first model hidden by a second model desired to be rendered cannot be displayed in a rendered result of the first model.
2. Description of the Related Art
When rendering (that is, visualizing) a model formed by a plurality of vertexes, a rendering apparatus performs a plurality of graphics operations for each of a plurality of fragments generated for respective planes formed by the vertexes. A depth test is an example of the graphics operations. More specifically, the depth test is a job for testing whether or not a fragment desired to be rendered can be expressed as a pixel on a screen, by comparing the depth value of the fragment with the depth value of a pixel corresponding to the fragment and stored in a depth buffer disposed in the rendering apparatus.
When a depth value of the fragment is read from the depth buffer for this depth test, it is preferable to use a smaller memory bandwidth for fetching a depth value read from the depth buffer. Accordingly, a method of performing a depth test by reading a depth value from a depth buffer and using the read depth value, while consuming a minimum memory bandwidth is required.